package com.ibeeking.found.open.service.common.param;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @ClassName OrderAmountQuery
 * @Description 订单金额
 * @Author ibeeking
 * @Date 2021-06-04 16:26
 **/
@Data
public class OrderAddParam implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 商户编码
     */
    @NotBlank(message = "商户编码不能为空")
    private String shopCode;

    /**
     * 会员id
     */
    @NotNull(message = "会员id不能为空")
    private Long memberId;

    /**
     * 订单id
     */
    @NotBlank(message = "订单id不能为空")
    private String orderId;

    /**
     * 订单类型，3-线下POS
     */
    @NotNull(message = "订单类型不能为空")
    private Integer orderType;

    /**
     * 券码集合
     */
    private List<Long> couponCodes;

    /**
     * 交易时间
     */
    @NotBlank(message = "交易时间不能为空")
    private String tradeTime;

    /**
     * 实付金额
     */
    @NotNull(message = "实付金额不能为空")
    private BigDecimal payAmount;

    /**
     * 应付金额
     */
    @NotNull(message = "应付金额不能为空")
    private BigDecimal orderAmount;

    /**
     * 促销优化金额
     */
    private BigDecimal promotionAmount;

    /**
     * 积分抵扣金额
     */
    private BigDecimal integrationAmount;

    /**
     * 券抵扣金额
     */
    private BigDecimal couponAmount;

    /**
     * 人工调整
     */
    private BigDecimal adjustAmount;

    /**
     * 支付方式
     */
    @Valid
    @NotEmpty(message = "支付方式必填")
    private List<OrderPayTypeParam> payType;

    /**
     * 商品skuId列表
     */
    @NotEmpty(message = "商品必填")
    @Valid
    private List<OrderGoodsParam> goodsSkus;
}
